package com.vmove.childtrain.db.entity;

import com.j256.ormlite.dao.ForeignCollection;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.field.ForeignCollectionField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * 测试记录
 */
@DatabaseTable(tableName = "tb_record")
public class Record {
    public static final String COLUMNNAME_ID = "id";
    public static final String COLUMNNAME_REDORD_NAME = "recordName";
    public static final String COLUMNNAME_TIME = "createTime";

    @DatabaseField(generatedId = true,columnName = COLUMNNAME_ID)
    private int id;

    @DatabaseField(canBeNull = true, foreign = true, columnName = "programId", foreignAutoRefresh = true)
    private Program program;

    @DatabaseField(canBeNull = true, foreign = true, columnName = "userId", foreignAutoRefresh = true)
    private User user;

    @DatabaseField(columnName = COLUMNNAME_REDORD_NAME)
    private String recordName;

    @DatabaseField(columnName = COLUMNNAME_TIME)
    private String createTime;

    /**
     * 总计 所有步骤触发耗时
     */
    @DatabaseField(columnName ="totalTime")
    private int totalTime;

    @DatabaseField
    private int succStepNum;

    @DatabaseField
    private int failStepNum;

    @DatabaseField
    private int totalStepNum;


    public Record() {
    }

    public int getTotalTime() {
        return totalTime;
    }

    public void setTotalTime(int totalTime) {
        this.totalTime = totalTime;
    }

    public String getRecordName() {
        return recordName;
    }

    public void setRecordName(String recordName) {
        this.recordName = recordName;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Program getProgram() {
        return program;
    }

    public void setProgram(Program program) {
        this.program = program;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public int getSuccStepNum() {
        return succStepNum;
    }

    public void setSuccStepNum(int succStepNum) {
        this.succStepNum = succStepNum;
    }

    public int getFailStepNum() {
        return failStepNum;
    }

    public void setFailStepNum(int failStepNum) {
        this.failStepNum = failStepNum;
    }

    public int getTotalStepNum() {
        return totalStepNum;
    }

    public void setTotalStepNum(int totalStepNum) {
        this.totalStepNum = totalStepNum;
    }
}
